# If the Java System property 'oozie.log.dir' is not defined at Oozie start up time
# XLogService sets its value to '${oozie.home}/logs'

# The appender that Oozie uses must be named 'oozie' (i.e. log4j.appender.oozie)

# Using the RollingFileAppender with the OozieRollingPolicy will roll the log file every hour and retain up to MaxHistory number of
# log files. If FileNamePattern ends with ".gz" it will create gzip files.
log4j.appender.oozie=org.apache.log4j.rolling.RollingFileAppender
log4j.appender.oozie.RollingPolicy=org.apache.oozie.util.OozieRollingPolicy
log4j.appender.oozie.File=${oozie.log.dir}/oozie.log
log4j.appender.oozie.Append=true
log4j.appender.oozie.layout=org.apache.log4j.PatternLayout
log4j.appender.oozie.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%n
# The FileNamePattern must end with "-%d{yyyy-MM-dd-HH}.gz" or "-%d{yyyy-MM-dd-HH}" and also start with the
# value of log4j.appender.oozie.File
log4j.appender.oozie.RollingPolicy.FileNamePattern=${log4j.appender.oozie.File}-%d{yyyy-MM-dd-HH}
# The MaxHistory controls how many log files will be retained (336 hours / 24 hours per day = 14 days); -1 to disable
log4j.appender.oozie.RollingPolicy.MaxHistory=336

# Uncomment the below two lines to use the DailyRollingFileAppender instead
# The DatePattern must end with either "dd" or "HH"
#log4j.appender.oozie=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.oozie.DatePattern='.'yyyy-MM-dd-HH

log4j.appender.oozieops=org.apache.log4j.DailyRollingFileAppender
log4j.appender.oozieops.DatePattern='.'yyyy-MM-dd
log4j.appender.oozieops.File=${oozie.log.dir}/oozie-ops.log
log4j.appender.oozieops.Append=true
log4j.appender.oozieops.layout=org.apache.log4j.PatternLayout
log4j.appender.oozieops.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n

log4j.appender.oozieinstrumentation=org.apache.log4j.DailyRollingFileAppender
log4j.appender.oozieinstrumentation.DatePattern='.'yyyy-MM-dd
log4j.appender.oozieinstrumentation.File=${oozie.log.dir}/oozie-instrumentation.log
log4j.appender.oozieinstrumentation.Append=true
log4j.appender.oozieinstrumentation.layout=org.apache.log4j.PatternLayout
log4j.appender.oozieinstrumentation.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n

log4j.appender.oozieaudit=org.apache.log4j.DailyRollingFileAppender
log4j.appender.oozieaudit.DatePattern='.'yyyy-MM-dd
log4j.appender.oozieaudit.File=${oozie.log.dir}/oozie-audit.log
log4j.appender.oozieaudit.Append=true
log4j.appender.oozieaudit.layout=org.apache.log4j.PatternLayout
log4j.appender.oozieaudit.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n

log4j.appender.openjpa=org.apache.log4j.DailyRollingFileAppender
log4j.appender.openjpa.DatePattern='.'yyyy-MM-dd
log4j.appender.openjpa.File=${oozie.log.dir}/oozie-jpa.log
log4j.appender.openjpa.Append=true
log4j.appender.openjpa.layout=org.apache.log4j.PatternLayout
log4j.appender.openjpa.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n

# log4j.logger.openjpa=INFO, openjpa
log4j.logger.oozieops=INFO, oozieops
# log4j.logger.oozieinstrumentation=ALL, oozieinstrumentation
log4j.logger.oozieaudit=ALL, oozieaudit
log4j.logger.org.apache.oozie=INFO, oozie
log4j.logger.org.apache.hadoop=WARN, oozie
log4j.logger.org.mortbay=WARN, oozie
log4j.logger.org.hsqldb=WARN, oozie
log4j.logger.org.apache.hadoop.security.authentication.server=WARN, oozie
